package com.san.hkhospital.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.san.hkhospital.entity.DepartmentExample;
import com.san.hkhospital.mapper.DepartmentMapper;
import com.san.hkhospital.entity.Department;
import com.san.hkhospital.service.DepartmentService;
/**
 * ClassName:DepartmentServiceImpl
 * PackageName:com.san.hkhospital.service.impl
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 14:38
 * 
 */
 
 
@Service
public class DepartmentServiceImpl implements DepartmentService{

    @Resource
    private DepartmentMapper departmentMapper;

    @Override
    public long countByExample(DepartmentExample example) {
        return departmentMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(DepartmentExample example) {
        return departmentMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer deptId) {
        return departmentMapper.deleteByPrimaryKey(deptId);
    }

    @Override
    public int insert(Department record) {
        return departmentMapper.insert(record);
    }

    @Override
    public int insertSelective(Department record) {
        return departmentMapper.insertSelective(record);
    }

    @Override
    public List<Department> selectByExample(DepartmentExample example) {
        return departmentMapper.selectByExample(example);
    }

    @Override
    public Department selectByPrimaryKey(Integer deptId) {
        return departmentMapper.selectByPrimaryKey(deptId);
    }

    @Override
    public int updateByExampleSelective(Department record,DepartmentExample example) {
        return departmentMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Department record,DepartmentExample example) {
        return departmentMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Department record) {
        return departmentMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Department record) {
        return departmentMapper.updateByPrimaryKey(record);
    }


    @Override
    public List<Department> selectDepartment() {
        return departmentMapper.selectByExample(null);
    }

}
